var fs = require("fs");
var zlib = require("zlib");
// 压缩input3.html文件为input3.html.gz
fs.createReadStream("input3.html")
.pipe(zlib.createGzip())
.pipe(fs.createWriteStream("input3.html.gz"));
console.log("文件压缩完成");